
import http from '@/util/request'
// 模版所有接口
// 地址： https://console-docs.apipost.cn/preview/ad6c547ec90418c3/6de695d08979c660?target_id=7912ceb4-2872-4d5f-9f05-5a68b2b47797
export default {
  add: {
    url: `${process.env.VUE_APP_API_URL}/SmartEvaluate/model/saveModel`,
    name: '新增编辑模版',
    post: async function (params) {
      const dataObj = await http.post(this.url, params)
      return dataObj
    }
  },
  addQuestion: {
    url: `${process.env.VUE_APP_API_URL}/SmartEvaluate/question/saveQuestion`,
    name: '新增编辑模版',
    post: async function (params) {
      const dataObj = await http.post(this.url, params)
      return dataObj
    }
  },
  list: {
    url: `${process.env.VUE_APP_API_URL}/SmartEvaluate/model/getPageModelList`,
    name: '获取模板列表',
    get: async function (params) {
      const dataObj = await http.post(this.url, params)
      return dataObj
    }
  },
  switch: {
    url: `${process.env.VUE_APP_API_URL}/SmartEvaluate/model/updateModelStatus`,
    name: '修改模版状态',
    post: async function (params) {
      const dataObj = await http.post(this.url, params)
      return dataObj
    }
  },
  copy: {
    url: `${process.env.VUE_APP_API_URL}/SmartEvaluate/model/copyModel`,
    name: '修改模版状态',
    post: async function (params) {
      const dataObj = await http.post(this.url, params)
      return dataObj
    }
  },
  sort: {
    url: `${process.env.VUE_APP_API_URL}/SmartEvaluate/question/updateQuestionSortNum`,
    name: '模版排序',
    post: async function (data) {
      const dataObj = await http.post(this.url, data)
      return dataObj
    }
  },
  del: {
    url: `${process.env.VUE_APP_API_URL}/SmartEvaluate/model/delModel`,
    name: '删除模版',
    post: async function (data) {
      const dataObj = await http.post(this.url, data)
      return dataObj
    }
  },
  delQuestion: {
    url: `${process.env.VUE_APP_API_URL}/SmartEvaluate/question/delQuestion`,
    name: '删除模版问题',
    post: async function (data) {
      const dataObj = await http.post(this.url, data)
      return dataObj
    }
  },
  detail: {
    url: `${process.env.VUE_APP_API_URL}/SmartEvaluate/question/getQaList`,
    name: '获取模版详情',
    get: async function (params) {
      const dataObj = await http.get(this.url, params)
      return dataObj
    }
  },
  editOption: {
    url: `${process.env.VUE_APP_API_URL}/SmartEvaluate/question/updateOptionjson`,
    name: '当个题目选项更新',
    post: async function (data) {
      const dataObj = await http.post(this.url, data)
      return dataObj
    }
  },
  upExcel: {
    url: `${process.env.VUE_APP_API_URL}/SmartEvaluate/plan/importEvaluateTemplate.json`,
    name: '下载列表',
    post: async function (params) {
      const dataObj = await http.upload(this.url, params)
      return dataObj
    }
  }
}
